﻿using System;
using System.Web.Mvc;
using System.ComponentModel.DataAnnotations;

namespace RedSand.Site.Models
{
    public class ProductInfo
    {
        [Key]
        [HiddenInput(DisplayValue = false)]
        public int ProductID { get; set; }

        [Display(Name = "CategoryID")]
        [Required]
        public int? CategoryID { get; set; }

        [Display(Name = "MakerID")]
        public int? MakerID { get; set; }

        [Display(Name = "Name")]
        [Required]
        public string Name { get; set; }

        [Display(Name = "Alias")]
        [RegularExpression(@"[a-zA-Z0-9_-]*")]
        [Required]
        public string Alias { get; set; }

        [Display(Name = "Image")]
        public string Image { get; set; }

        [Display(Name = "Price")]
        [Required]
        [RegularExpression(@"[0-9]*(\.[0-9])?[0-9]*")]
        public string Price { get; set; }

        [Display(Name = "Details")]
        public string Details { get; set; }

        [Display(Name = "Status")]
        public byte? Status { get; set; }

        [Display(Name = "IsBargain")]
        public bool? IsBargain { get; set; }

        [Display(Name = "BargainImage")]
        public string BargainImage { get; set; }
    }
    public class ProductSearchModel
    {
        public string Keyword { get; set; }
        public byte? Status { get; set; }
        public int? MakerID { get; set; }
        public int? ParentCategoryID { get; set; }
        public int? CategoryID { get; set; }
        public int? SubCategoryID { get; set; }
    }

    public class SpecificationInfo
    {
        [Display(Name = "ProductID")]
        public int? ProductID { get; set; }

        [Display(Name = "PropertyID")]
        public int? PropertyID { get; set; }

        [Display(Name="Property name")]
        public string PropertyName { get; set; }

        [Display(Name = "Value")]
        public string Value { get; set; }
    }

    public class ProductInfo2
    {
        [Key]
        public int ProductID { get; set; }

        public int? CategoryID { get; set; }

        public int? MakerID { get; set; }

        public string Name { get; set; }

        public string Alias { get; set; }

        public string Image { get; set; }

        public string Price { get; set; }
        
        public string Details { get; set; }

        public byte? Status { get; set; }

        public bool? IsBargain { get; set; }

        public string BargainImage { get; set; }

        public string ImgProduct { get; set; }
    }
}
